﻿using System;
using System.Reflection;

class Person
{
    public string Name { get; set; }
    public int Age { get; set; }

    public Person(string name, int age)
    {
        Name = name;
        Age = age;
    }
}

class Program
{
    static void Main(string[] args)
    {
        Type personType = typeof(Person);

        ConstructorInfo constructor = personType.GetConstructor(new Type[] { typeof(string), typeof(int) });

        if (constructor != null)
        {
            object[] parameters = new object[] { "John", 30 };
            Person person = (Person)constructor.Invoke(parameters);

            Console.WriteLine($"Name: {person.Name}");
            Console.WriteLine($"Age: {person.Age}");
        }
        else
        {
            Console.WriteLine("Constructor not found.");
        }

        Console.ReadLine();
    }
}
